using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BanZuiCloudControlAgent.Utils.Common
{
    /// <summary>
    /// 应用程序配置
    /// </summary>
    public class AppSettings
    {
        /// <summary>
        /// UI配置
        /// </summary>
        public UISettings UI { get; set; } = new UISettings();
    }

    /// <summary>
    /// UI配置
    /// </summary>
    public class UISettings
    {
        /// <summary>
        /// 服务器地址
        /// </summary>
        public string ServerUrl { get; set; } = "110.40.130.190";

        /// <summary>
        /// 服务器端口
        /// </summary>
        public int ServerPort { get; set; } = 1889;

        /// <summary>
        /// 用户名
        /// </summary>
        public string Username { get; set; } = "agent";

        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; } = "Aa5201314..";

        /// <summary>
        /// 是否使用TLS
        /// </summary>
        public bool UseTls { get; set; } = true;

        /// <summary>
        /// 客户端ID
        /// </summary>
        public string ClientId { get; set; } = "";

        /// <summary>
        /// 心跳间隔（秒）
        /// </summary>
        public int HeartbeatInterval { get; set; } = 30;

        /// <summary>
        /// 重登录间隔（秒）
        /// </summary>
        public int ReLoginInterval { get; set; } = 5;

        /// <summary>
        /// 最大重登录次数，0表示无限次
        /// </summary>
        public int MaxReLoginAttempts { get; set; } = 0;

        /// <summary>
        /// 主题前缀
        /// </summary>
        public string TopicPrefix { get; set; } = "cloud";

        /// <summary>
        /// 是否自动启动
        /// </summary>
        public bool AutoStart { get; set; } = false;

        /// <summary>
        /// 设备名称
        /// </summary>
        public string DeviceName { get; set; } = "默认设备";

        /// <summary>
        /// 是否自动登录
        /// </summary>
        public bool AutoLogin { get; set; } = false;

        /// <summary>
        /// 设备码
        /// </summary>
        public string DeviceCode { get; set; } = "";

        /// <summary>
        /// 客户端版本号
        /// </summary>
        public string ClientVersion { get; set; } = "1.0.0";
    }
} 